<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script>
      //1.concat('str1','str2',...)
      var str1 = "pink";
      var str2 = "red";
      console.log(str1.concat(str2));
      console.log(str1.concat(str2, "blue"));

      //2.substr(截取起始位置,截取几个字符)
      var str = "改革春风吹满地";
      console.log(str.substr(2, 2)); //索引号2开始 截取两个字符
    </script>
  </head>
  <body></body>
</html>
